package pub.wkq.springboot.controller;

import org.springframework.web.bind.annotation.*;
import pub.wkq.springboot.pojo.Ingredient;

@RestController
@RequestMapping("/test")
public class TestController {
    /**
     * GET http://localhost:8080/test?ingredient=FLTO
     * {
     *   "id": "FLTO",
     *   "name": "Flour Tortilla",
     *   "type": "WRAP"
     * }
     * @param ingredient
     * @return
     */
    @GetMapping
    public Ingredient test(@RequestParam Ingredient ingredient) {
        return ingredient;
    }

}
